//
//  GCWordLabel.m
//  GC_OC
//
//  Created by 叶建辉 on 2022/6/9.
//

#import "GCWordLabel.h"

@interface GCWordLabel ()

@end

@implementation GCWordLabel

- (void)drawRect:(CGRect)rect {
    // 1.绘制文字
    [super drawRect:rect];
    
    rect.size.width *= self.colorRatio;
    // 2.设置颜色
    [self.blendColor set];
    
    UIRectFillUsingBlendMode(rect, kCGBlendModeSourceIn);
}

- (void)setColorRatio:(CGFloat)colorRatio {
    _colorRatio = colorRatio;
    
    [self setNeedsDisplay];
}
@end
